package miku.firstgame.net
{
	import flash.utils.ByteArray;

	/**
	 * 序列化xml到bytes
	 */
	internal class Encoder
	{
		public static function encode(obj:Object):ByteArray
		{
			var packet:ByteArray = new ByteArray();
			packet.writeMultiByte(String(obj), "utf-8");
			packet.writeByte(0);
			return packet;
		}
	}
}
